#include "lvgl_app/lvgl_app.h"

/*枚举
界面ID
    PM_ID_MAIN

界面参数
    PAGE_MAIN_NUM
*/

static lv_style_t style_1;
static lv_style_t style_2;

static void page_onLoad(void* pm_page)
{
    lv_obj_t* page = lv_pm_get_pm_page(pm_page)->page;

    lv_obj_t* title_label = lv_label_create(page);
    lv_obj_add_style(title_label, &style_1, LV_PART_MAIN);
    lv_label_set_text(title_label, "main");
    lv_obj_align(title_label, LV_ALIGN_CENTER, 0, -80);

}

static void page_unLoad(void* pm_page)
{
    //lv_style_reset(&style_1);
    //lv_style_reset(&style_2);
    lv_obj_t* page = lv_pm_get_pm_page(pm_page)->page;

}
void page_create_page_main(lv_pm_id_t id)
{
    lv_pm_page_t* page = lv_pm_create.create(id, page_onLoad, page_unLoad);
    lv_pm_create.status_bar(page, false);

    lv_style_init(&style_1);
    lv_style_set_text_font(&style_1, &lv_font_montserrat_14);

    lv_style_init(&style_2);
    lv_style_set_text_font(&style_2, &lv_font_montserrat_14);
}
